import http from '@/utils/http';

// 数据面板-宠物数据分析接口
export function getPetAnalysisAPI(){
    return http({
        url:"/pet-adopt/admin/dashboard/pet-stats"
    })
}

// 宠物列表接口
export function getPetListAPI(){
    return http({
        url:"/pet-adopt/admin/pet-list"
    })
}

// 上传图片接口
export function postImageAPI(formData){
    return http({
        url:'/upload/image',
        method:"post",
        data:formData
    })
}

// 发布宠物接口
export function publishPetInfo(data) {
    return http({
        url: "/pet-adopt/admin/pets/publish",
        method: 'post',
        data
    });
}

//删除宠物接口
export function deletePetAPI(petId) {
    return http({
        url: "/pet-adopt/pets/deletePet",
        method: "delete",
        params: { petId } 
    });
}

// 宠物信息修改接口：
export function postupdatePetInfo(PetInfo){
    return http({
        url:"/pet-adopt/updatePetInfo",
        method:"post",
        data:PetInfo
    })
}